$_POST vs. $_SERVER['REQUEST_METHOD'] == 'POST'

Posted by Scott on Stack Overflow See other posts from Stack Overflow or by Scott
Published on 2009-01-03T16:56:23Z Indexed on 2010/03/22 13:21 UTC
Read the original article Hit count: 125

Filed under:

Some guy called one of my Snipplr submissions "crap" because I used if ($_SERVER['REQUEST_METHOD'] == 'POST') instead of if ($_POST)

Checking the request method seems more correct to me because that's what I really want to do. Is there some operational difference between the two or is this just a code clarity issue?

© Stack Overflow or respective owner

Related posts about php